// DBPool.h: interface for the CDBPool class.
//
//////////////////////////////////////////////////////////////////////

#pragma once

#include "DataBase.h"

#define MAXDBNUM 5

class CDBConnPool 
{
public:
	CDBConnPool();

	virtual ~CDBConnPool();

	void PushBackOneDBConn(int DBConnId);

	int FindOneDBConn();


	static CDBConnPool* GetInstance()
	{

		static CDBConnPool* psDBConnPool   = new CDBConnPool();

		return  psDBConnPool;

	}

	CDB m_dbs[MAXDBNUM];

	int m_DBUsed[MAXDBNUM];

	char m_cDBpass[81];

	char m_cDBuser[81];

	CRITICAL_SECTION  m_cs;
};

